package org.agora.photogallery.client.event;

import org.agora.photogallery.client.model.Photo;

import com.google.gwt.event.shared.GwtEvent;

public class PhotoThumbnailClickedEvent extends GwtEvent<PhotoThumbnailClickedHandler> {
	public static final Type<PhotoThumbnailClickedHandler> TYPE = new Type<PhotoThumbnailClickedHandler>();
	private final Photo photo;
	
	public PhotoThumbnailClickedEvent(Photo p ){
		super();
		photo = p;
	}
	@Override
	public com.google.gwt.event.shared.GwtEvent.Type<PhotoThumbnailClickedHandler> getAssociatedType() {
		return TYPE;
	}

	@Override
	protected void dispatch(PhotoThumbnailClickedHandler handler) {
		handler.onPhotoThumbnailClicked(this);
		
	}
	
	public Photo getPhoto(){
		return photo;
	}

}
